package cn.flyingocean;

import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;
import java.util.List;

public class PushUnSubmitName2File {
	public static boolean push(List<String> nameList,String filePath) {
		try {
			FileOutputStream fos = new FileOutputStream(filePath,true);
	        OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");
	        BufferedWriter writer = new BufferedWriter(osw);
	        
	        for(String name:nameList) {
	        	writer.write(name);
	        	writer.newLine();
	        }
	        writer.close();
	        osw.close();
	        fos.close();
	        return true;
		}catch(Exception e) {
			e.printStackTrace();
		}
		return false;
	}
}
